package com.zhiyou.set;

public class People implements Comparable<People>{
	String idCard;
	String name;
	int    age;
	
	public People(String idCard, String name, int age) {
		super();
		this.idCard = idCard;
		this.name = name;
		this.age = age;
	}

	
	@Override
	public int compareTo(People people) {
		//this   people
		//return  this.idCard.compareTo(people.idCard);
		return  this.age - people.age;
	}

	//alt+shift+s  
	@Override
	public String toString() {
		return "People [idCard=" + idCard + ", name=" + name + ", age=" + age + "]";
	}
	
	
	
}
